d01asf
d01asf
© Numerical Algorithms Group, 2002.
Purpose
D01ASF 1-D quadrature, adaptive, semi-infinite interval, weight function
cos ( omega x) or sin ( omega x)
Synopsis
[result,abserr,lst,erlst,rslst,ierlst,iw,ifail] = d01asf(g,a,omega,epsabs<,...
key,limlst,liw,ifail>)
Description
D01ASF is an adaptive routine, designed to integrate a function
of the form g(x)w(x) over a semi-infinite interval, where w(x) is
either sin((omega)x) or cos((omega)x). Over successive intervals
C =[a+(k-1)c,a+kc], k=1,2,...,LST
k
integration is performed by the same algorithm as is used by
D01ANF. The intervals C are of constant length
k
c={2[|(omega)|]+1}(pi)/|(omega)|, (omega)/=0
where [|(omega)|] represents the largest integer less than or
equal to |(omega)|.
If (omega)=0 and KEY = 1, the routine uses the same algorithm as
D01AMF (with EPSREL = 0.0).
In contrast to the other routines in Chapter D01, D01ASF works
only with a user-specified absolute error tolerance (EPSABS).
Over the interval C it attempts to satisfy the absolute accuracy
k
requirement
EPSA =U *EPSABS
k k
k-1
where U =(1-p)p , for k=1,2,... and p=0.9.
k
However, when difficulties occur during the integration over the
kth sub-interval C such that the error flag IERLST(k) is non-
k
zero, the accuracy requirement over subsequent intervals is
relaxed.
Parameters
d01asf
Required Input Arguments:
g function (User-Supplied)
a real
omega real
epsabs real
Optional Input Arguments: <Default>
key integer 2
limlst integer 50
liw integer 1000
ifail integer -1
Output Arguments:
result real
abserr real
lst integer
erlst (limlst) real
rslst (limlst) real
ierlst (limlst) integer
iw (liw) integer
ifail integer